package com.frank.controller;

import com.frank.pojo.NavRights;
import com.frank.service.NavService;
import com.frank.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Frank
 */
@RestController
@CrossOrigin
@RequestMapping("/navigationBar")
public class NavController {
    @Autowired
    private NavService navService;
    /**
     * URL: /navigationBar/getRightsList
     * 参数: 无
     * 类型: get类型
     * 返回值: SysResult对象(list)集合
     */
    @GetMapping("/getRightsList")
    public SysResult getRightsList(){
        List<NavRights> list = navService.getRightsList();
        return SysResult.success(list);
    }
}
